diff --git a/pylint/lint/pylinter.py b/pylint/lint/pylinter.py
index e9195f86e..9437c6908 100644
--- a/pylint/lint/pylinter.py
+++ b/pylint/lint/pylinter.py
@@ -1207,7 +1207,7 @@ class PyLinter(
         :param line: The line of the currently analysed file
         :param confidence: The confidence of the message
         """
-        if confidence and confidence.name not in self.config.confidence:
+        if confidence and confidence.name not in self.config.confidence and confidence.name != 'UNDEFINED':
             return False
         try:
             msgids = self.msgs_store.message_id_store.get_active_msgids(msg_descr)
